package com.class05.k_innerclass;


import com.class05.j_innerclass.Mouse;

public class Test01 {
    public static void main(String[] args) {
        USB usb = method();
//        usb.open();
//        局部内部类无法在方法外使用
//        Mouse mouse = (USB)method();
    }


    public static USB method(){
        class Mouse implements USB{

            @Override
            public void open() {
                System.out.println("鼠标打开了");
            }
        }
        return new Mouse();
    }
}
